Skip to content

Conversation

@l3utterfly
Copy link
Contributor

@l3utterfly l3utterfly commented Oct 28, 2025

It seems buffer_type.device and repack_buffer_type.device remains uninitialised.

This causes an sporadic crash at ggml_backend_dev_get_props(dev, &props); at llama-model.cpp:6184.

I believe ggml_hexagon_session should always be initialised with the device it corresponds to?

The original code works fine when ran via the cli, however, the crash becomes apparent when bundled into a consumer facing APK.

This fix is tested to fix this issue (running from packaged APK, S25+ Ultra)

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Oct 28, 2025
Copy link
Collaborator

@max-krasnyansky max-krasnyansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Good catch. I'm thinking "how did I miss this?" :)
ggml_backend_buft_get_device() uses that .device pointer.
I merge locally and tested on Gen5 device.

@max-krasnyansky max-krasnyansky merged commit 8284efc into ggml-org:master Oct 28, 2025
65 of 67 checks passed
@l3utterfly l3utterfly deleted the patch-2 branch October 29, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants